<!--
    功能待拆分为更细粒度的minxins，方便功能的组合使用
-->
<template>
	<div class="node-panel grid-panel">
		<div class="node-header">
			<Action-panel v-if="hasAction"
			              v-show="actionShow"
			              :modalTransfer="actionModalTransfer"
			              :selectStatus="selectStatus"
			              :model="listModel.actions"></Action-panel>
			<div v-if="dev">
				<actionCollection></actionCollection>
			</div>
			<Search-input v-if="hasSearch"
			              ref="search"
			              :formRequire="searchRequire"
			              :formCol="searchCol"
			              module='search'
			              :filterData="filterData"
			              :actionModel="searchModel"
			              :fixedSearchPanel="fixedSearchPanel"
			              :data="filterInitData"
			              :fetching="loading"
			              @formTrigger="filterTrigger"
			              @trigger="filterTrigger"
			              :model="listModel"></Search-input>
		</div>
		<Grid-table class="node-content"
		            :unselect="unselect"
		            @rowCheck="$emit('rowCheck',$event)"
		            @dbTrigger="dbTrigger"
		            :singleSelect="singleSelect"
		            @checkChange="checkChange"
		            @actionTrigger="actionTrigger"
		            ref="table"
		            :hasInlineAction="hasInlineAction"
		            :loading="loading"
		            :model="listModel"
		            :hasCheck="hasCheck"
		            :rowCheckMode="rowCheckMode"
		            :data="listData">
			<template slot="item"
			          slot-scope="data">
				<slot name="item"
				      scope="data"
				      :feilds="data.feilds"
				      :row="data.row"></slot>
			</template>
		</Grid-table>
		<div class="table-page"
		     v-if="hasPage">
			<Page :total="totalCount || listData.length"
			      @on-page-size-change="pageSizeChange"
			      :page-size="pageSize"
			      :current="pageOn"
			      show-total
			      :size="size"
			      @on-change="fetch"></Page>
		</div>
	</div>
</template>

<script>
import GridTable from '@/components/gridTableMin';
import GridPanel from '@/node/gridPanel/index';
import moduleStore from '@/node/gridPanel/store';
export default {
	mixins: [GridPanel],
	moduleStore,
	components: {
		GridTable,
	},
};
</script>

<style lang="less">

</style>
